﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Interactivity;
using System.Windows.Controls.Primitives;
//using Microsoft.Expression.Interactivity.Core;

namespace ServerVideoChat
{
	public class RunWCFServiceBehavior : Behavior<ToggleButton>
	{
		public RunWCFServiceBehavior()
		{
		}

		protected override void OnAttached()
		{
			base.OnAttached();
            this.AssociatedObject.Checked += (_1, _2) => { App.ViewModel.RunConferencService(); };
            this.AssociatedObject.Unchecked += (_1, _2) => { App.ViewModel.CloseConferencService(); };
		}

		protected override void OnDetaching()
		{
			base.OnDetaching();
		}
	}
}